Version Considerations ====================== The Seeq SPy module relies upon the Seeq SDK module in order to function. Your notebook, Add-on or script code may require a particular version of SPy in order to function properly. This notebook details how to check version information of the Seeq libraries. Read the `installation page `__ for details around the version schema, library compatibility, and package installation or upgrades. Displaying Version Information ------------------------------ If you’d like to check what version you’re running with, just print out the current session information, like so: .. code:: ipython3 from seeq import spy spy.session .. parsed-literal:: Not logged in. Seeq SDK Module Version: 66.28.5 @ C:\git\crab\sdk\pypi\seeq\sdk Seeq SPy Module Version: 197.3 @ C:\git\crab\sdk\pypi\seeq\spy Maintaining Compatibility Across Library Updates ------------------------------------------------ The ``compatibility`` option can be used to emulate the behavior of the specified major version of SPy. Using this option can help prevent scripts and Add-ons from breaking due to behavior changes across SPy’s major versions. Check the `Change Log `__ for compatibility considerations. .. code:: ipython3 # Set the compatibility option so that you maximize the chance that SPy will remain compatible with your notebook/script spy.options.compatibility = 197 Checking for a Sufficient Version --------------------------------- If you are writing a reusable notebook or script, or you are writing an Add-on, you may wish to include a *version check* in your code. Version checks are notoriously difficult to code correctly, so the ``spy.utils`` module includes some convenience functions to do the hard work for you. Here are some examples: .. code:: ipython3 from seeq import spy # Login so we can check the Seeq Server version spy.login(url='http://localhost:34216', credentials_file='../credentials.key', force=False) # Check the SPy version print(f'SPy is at least 184.3? {spy.utils.is_spy_module_version_at_least(184, 3)}') print(f'Seeq Server is at least R73.3.1? {spy.utils.is_server_version_at_least(73, 3, 1)}') .. raw:: html
Logged in to http://localhost:34216 as agent_api_key.
Seeq Server Version: R66.0.0-SNAPSHOT
Seeq SDK Module Version: 66.0.0 @ C:\git\crab\sdk\pypi\seeq\sdk
Seeq SPy Module Version: 193.0 @ C:\git\crab\sdk\pypi\seeq\spy
.. parsed-literal:: SPy is at least 184.3? True Seeq Server is at least R73.3.1? False Function Reference ------------------ .. code:: ipython3 help(spy.utils.get_spy_module_version_tuple) help(spy.utils.is_spy_module_version_at_least) .. code:: ipython3 help(spy.utils.get_sdk_module_version_tuple) help(spy.utils.is_sdk_module_version_at_least) .. code:: ipython3 help(spy.utils.get_server_version_tuple) help(spy.utils.is_server_version_at_least)